<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<table class="table">
    <tr>
        <th>ID</th>
        <th>属性名称</th>
        <th>颜色</th>
        <th>操作</th>
    </tr>
    <foreach name="attr" item="v">
        <tr>
            <td>{$v.id}</td>
            <td>{$v.name}</td>
            <td>
                <div style="width: 20px;height: 20px;background: {$v.color}"></div>
            </td>
            <td>
                [<a href="{:U('editAttr',array('id'=>$v['id']))}">修改</a>]
                [<a href="{:U('deleteAttr',array('id'=>$v['id']))}">删除</a>]
            </td>
        </tr>
    </foreach>
</table>
</body>
</html>